package com.lightjet.macross.base.awf.repository;

import com.lightjet.macross.base.awf.domain.BizProcessConfig;
import com.lightjet.macross.common.core.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author : lijia
 * @version : 1.0 2019-06-18 11:21
 * description : 流程配置表实体类数据层接口
 */

@Repository("bizProcessConfigRepository")
public interface BizProcessConfigRepository extends BaseRepository<BizProcessConfig,Integer> {
    List<BizProcessConfig> findByProcinstdefIdAndNodedefIdAndConfigtype(String pdid, String nodeid, BizProcessConfig.ConfigTypes type);

    List<BizProcessConfig> findByProcinstdefIdAndConfigtype(String pid, BizProcessConfig.ConfigTypes type);

    /** description:分组获取流程定义集合  */
    @Query("select t.procinstdefId from BizProcessConfig t group by t.procinstdefId")
    List<String> findProcinstDefIdGroup();
}
